package com.qdu.service;

import com.qdu.dao.ActiCommentDao;
import com.qdu.dao.ActiCommentReplyDao;
import com.qdu.entity.ActiComment;
import com.qdu.entity.ActiCommentReply;
import java.util.List;

/**
 *评论活动的相关业务逻辑
 * @author 19645
 */
public class ActivCommentService {
    ActiCommentDao actiCommentDao=new ActiCommentDao();
    ActiCommentReplyDao actiCommentReplyDao = new ActiCommentReplyDao();
    
    //根据活动id，获取评论列表
    public List<ActiComment> findComment(String activityId){
        return actiCommentDao.getCommentByActivityId(activityId);
    }
    
    //根据评论活动（acommentId）的id，获取一个回复列表
    public List<ActiCommentReply> findReply(String acommentId){
        return actiCommentReplyDao.getACommentReplyByCommentAndUserId(acommentId);
    }
    
    //增加评论,返回影响几行
    public int AddOneComment(String activityId,String Uid,String content){
        int row;
        row=actiCommentDao.AddComment(activityId,Uid,content);
        return row;
    }
    
    //增加活动
    public int addActivity(){
        int rows=0;
        return rows;
    }
    public int addAgree(String ACid){
        return actiCommentDao.AddAgree(ACid);
    }
}
